<!--
 * @Author: your name
 * @Date: 2021-08-10 17:55:45
 * @LastEditTime: 2021-08-11 17:14:16
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \dhjk-admin\src\components\HelloWorld.vue
-->
<template>
  <div class="container">
    <el-table v-loading="loading" stripe :data="list.slice((page-1)*pageSize,page*pageSize)" stripe style="width: 100%">
      <el-table-column align="center" label="序号">
        <template slot-scope="scope">
          <span>{{ scope.$index + 1 }}</span>
        </template>
      </el-table-column>
      <el-table-column align="center" label="单位">
        <template slot-scope="scope">
          <span>{{ scope.row.city }}</span>
        </template>
      </el-table-column>
      <el-table-column align="center" label="账号">
        <template slot-scope="scope">
          <span>{{ scope.row.userName }}</span>
        </template>
      </el-table-column>
      <el-table-column align="center" label="密码">
        <template slot-scope="scope">
          <span>{{ scope.row.password }}</span>
        </template>
      </el-table-column>
    </el-table>
    <div class="pagination">
      <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page.sync="page"
          :page-size="pageSize"
          :page-sizes="[5,10,20]"
          layout="total, sizes, prev, pager, next, jumper"
          :total="total"
      >
      </el-pagination>
    </div>
  </div>
</template>

<script>
//:data="list.slice((page-1)*pageSize,page*pageSize)"
export default {
  data() {
    return {
      list: [
        {
          city: "省公司",
          url: "http://10.219.102.119/siteweb/Pages/Common/Login.aspx",
          userName:'xinxizhongxin',
          password:'xinxizhongxin',
          status:'1'
        },
        {
          city: "乌鲁木齐",
          url: "http://192.168.4.122",
          userName:'root',
          password:'wjdh@2020',
          status:'0'
        },
        {
          city: "昌吉",
          url: "http://22.22.22.60",
          userName:'admin',
          password:'admin',
          status:'0'
        },
        {
          city: "吐鲁番",
          url: "http://10.218.186.72/ads.web/pages/login.html",
          userName:'administrator',
          password:'tlfser@186',
          status:'1'
        },
        {
          city: "奎屯",
          url: "http://10.218.190.5:13389",
          userName:'administrator',
          password:'Ktadmin7186@',
          status:'0'
        },
        {
          city: "哈密",
          url: "http://10.218.67.195:13389",
          userName:'DELL',
          password:'admin*2020',
          status:'0'
        },
        {
          city: "博尔塔拉",
          url: "http://10.218.144.10",
          userName:'administrator',
          password:'bzxx123456-+',
          status:'0'
        },
        {
          city: "伊犁",
          url: "http://10.219.234.246:3389",
          userName:'administrator',
          password:'siteweb@2011',
          status:'0'
        },
        {
          city: "塔城",
          url: "http://192.168.8.1",
          userName:'admin',
          password:'tcdl1234+',
          status:'0'
        },
        {
          city: "阿勒泰",
          url: "http://10.218.157.139",
          userName:'admin',
          password:'siteweb@2019',
          status:'0'
        },
        {
          city: "巴州",
          url: "http://196.168.1.198",
          userName:'administrator',
          password:'Windows2008',
          status:'0'
        },
        {
          city: "和田",
          url: "http://10.218.132.129/UI/login.php",
          userName:'admin',
          password:'HTdl.7186++',
          status:'1'
        },
        {
          city: "喀什",
          url: "http://10.219.148.201:13389",
          userName:'Administrator',
          password:'ksdl@2020',
          status:'0'
        },
        {
          city: "克州",
          url: "http://10.219.150.35:18080/PEMS/",
          userName:'kzdl',
          password:'Kzdl@2021',
          status:'0'
        },
        {
          city: "电科院",
          url: "http://10.218.208.34:13389",
          userName:'administrator',
          password:'windows2008@dky',
          status:'0'
        },
        {
          city: "培训中心",
          url: "http://10.218.224.253",
          userName:'admin',
          password:'adminadmin',
          status:'0'
        },
        {
          city: "检修公司",
          url: "http://10.218.4.43",
          userName:'jxgsxxb',
          password:'xxb320xxb*',
          status:'0'
        },
        {
          city: "物资公司",
          url: "http://192.168.1.254:8080",
          userName:'admin',
          password:'adminadmin',
          status:'0'
        },
        {
          city: "综合能源",
          url: "http://24.83.178.251",
          userName:'admin',
          password:'ZHny@0312',
          status:'0'
        },
        {
          city: "新能集团",
          url: "http://192.168.1.31",
          userName:'shoonis',
          password:'XNds@5188..',
          status:'0'
        },
      ],
      loading:false,
      page:1,
      pageSize:10,
      total: 20,
    };
  },

  mounted() {},

  methods: {
    handleSizeChange(val) {
      console.log("每页条数",val)
      this.pageSize = val
    },
    handleCurrentChange(val) {
      console.log('当前页',val)
      this.page = val
    },
  },
};
</script>

<style lang='scss' scoped>
.container {
  width: 90vw;
}
.pagination {
  display: flex;
  justify-content: center;
  padding: 20px 0;
}
</style>